import { createApp } from 'vue'
import App from './App.vue'

// 引入全局css
import '@/assets/main.css'
// 导入路由
import router from '@/router/index'

// 导入element-plus组件库
import elementPlus from 'element-plus'
// 导入组件样式表
import 'element-plus/theme-chalk/index.css'
import * as Icons from '@element-plus/icons-vue'

// 引入加载进度条样式
import 'nprogress/nprogress.css'
// 导入大菠萝仓库
import { createPinia } from 'pinia'

//创建vue实例
const app = createApp(App)

Object.keys(Icons).forEach(key => {
    app.component(key, Icons[key])
})

app.use(router)
app.use(elementPlus)
app.use(createPinia())
app.mount('#app')
